<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<div id="log"></div>
<script>
test(() => assert_selection(
    [
        '<div contenteditable>',
            '<a href="#">1|</a><div>3</div>',
        '</div>',
    ].join(''),
    selection => {
        selection.document.execCommand('insertParagraph');
        selection.document.execCommand('insertText', false, '2');
    },
    [
        '<div contenteditable>',
            '<a href="#">1</a>',
            '<div>2|<br>',
                '<div>3</div>',
            '</div>',
        '</div>',
    ].join('')),
    'Simulate hitting return at the end of line');
</script>
